package com.wondertek.service.dto.app.req;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

/**
 * @author wangyu
 */
@Data
public class AddModeTimedTaskReq {

    @Schema(name = "id",description = "id")
    private String id;

    @Schema(name = "taskId",description = "任务id")
    private String taskId;

    @NotBlank
    @Schema(name = "name",description = "任务名称")
    private String name;

    @NotBlank
    @Schema(name = "roomId",description = "分区id")
    private String roomId;

    @NotBlank
    @Schema(name = "mode",description = "布防模式：'T'-Total外出布防模式,'p1'-Partial1在家布防模式,'D'-撤防")
    private String mode;

    @NotBlank
    @Schema(name = "time",description = "时间(时分秒) 格式: 22:00:00")
    @Pattern(regexp = "^(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d$", message = "time格式错误")
    private String time;

    @NotBlank
    @Schema(name = "week",description = "星期一2 星期二3 星期三4 星期四5 星期五6 星期六7 星期天1  多个逗号分隔 例: 2,3,4")
    @Pattern(regexp = "^(?:([1-7])(?!.*\\1)(\\,(?=[1-7]))?)+$", message = "week格式错误")
    private String week;

    @Schema(name = "status",description = "任务状态  0：正常  1：暂停")
    private int status = 0 ;

}
